Developer Documentation

QuickTime 4 API Documentation

QuickTime Movie File Format Specification, May 1996

| Previous | Chapter contents | Chapter top | Next |

Finding a Sample

When QuickTime displays a movie or track, it tells the appropriate media handler to access the media data for a particular time. The media handler must correctly interpret the data stream to retrieve the requested data. In the case of video media, the media handler traverses several atoms to find the location and size of a sample for a given media time. The media handler does the following:

  1. Determines the time in the media time coordinate system.
  2. Examines the time-to-sample atom to determine the sample number that contains the data for the specified time.
  3. Scans the sample-to-chunk atom to discover which chunk contains the sample in question.
  4. Extracts the offset to the chunk from the chunk offset atom.
  5. Finds the offset within the chunk and the sample's size by using the sample size atom.

© 1997 Apple Computer, Inc.

| Previous | Chapter contents | Chapter top | Next |